<!doctype HTML public "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- Click to Convert 5.2: Anything to HTML -->
<!-- http://www.clicktoconvert.com -->

<html>
<head>
<title>gravityboxscheduleuserguide - page 164 of 234</title>
<meta http-equiv=content-type content=text/html;charset=iso-8859-1>
<meta name="Generator" content="Click to Convert">

<!--Start of page styles-->
<STYLE TYPE="text/css">
<!--
 /* Foreground Image Styles */

 /* Position Styles */
 .ts164p0{position:absolute;left:106px;top:97px;}
 .ts164p1{position:absolute;left:352px;top:97px;}
 .ts164p3{position:absolute;left:665px;top:97px;}
 .ts164p7{position:absolute;left:106px;top:113px;}
 .ts164p8{position:absolute;left:706px;top:1026px;}
 .ts164p9{position:absolute;left:331px;top:1044px;}
 .ts164p13{position:absolute;left:106px;top:147px;}
 .ts164p15{position:absolute;left:106px;top:165px;}
 .ts164p16{position:absolute;left:106px;top:183px;}
 .ts164p18{position:absolute;left:106px;top:201px;}
 .ts164p20{position:absolute;left:106px;top:220px;}
 .ts164p23{position:absolute;left:106px;top:238px;}
 .ts164p25{position:absolute;left:106px;top:256px;}
 .ts164p27{position:absolute;left:106px;top:274px;}
 .ts164p29{position:absolute;left:106px;top:292px;}
 .ts164p31{position:absolute;left:106px;top:310px;}
 .ts164p33{position:absolute;left:106px;top:329px;}
 .ts164p34{position:absolute;left:106px;top:347px;}
 .ts164p35{position:absolute;left:106px;top:365px;}
 .ts164p39{position:absolute;left:106px;top:384px;}
 .ts164p40{position:absolute;left:106px;top:402px;}
 .ts164p41{position:absolute;left:106px;top:421px;}
 .ts164p43{position:absolute;left:106px;top:439px;}
 .ts164p45{position:absolute;left:106px;top:457px;}
 .ts164p46{position:absolute;left:106px;top:477px;}
 .ts164p48{position:absolute;left:106px;top:495px;}
 .ts164p49{position:absolute;left:106px;top:513px;}
 .ts164p51{position:absolute;left:106px;top:531px;}
 .ts164p52{position:absolute;left:106px;top:549px;}
 .ts164p54{position:absolute;left:106px;top:567px;}
 .ts164p56{position:absolute;left:106px;top:586px;}
 .ts164p58{position:absolute;left:106px;top:604px;}
 .ts164p60{position:absolute;left:106px;top:622px;}
 .ts164p62{position:absolute;left:106px;top:640px;}
 .ts164p64{position:absolute;left:106px;top:658px;}
 .ts164p66{position:absolute;left:106px;top:676px;}
 .ts164p68{position:absolute;left:106px;top:694px;}
 .ts164p70{position:absolute;left:106px;top:712px;}
 .ts164p71{position:absolute;left:106px;top:731px;}
 .ts164p73{position:absolute;left:106px;top:749px;}
 .ts164p74{position:absolute;left:106px;top:767px;}
 .ts164p78{position:absolute;left:106px;top:786px;}
 .ts164p79{position:absolute;left:106px;top:804px;}
 .ts164p82{position:absolute;left:106px;top:823px;}
 .ts164p84{position:absolute;left:106px;top:841px;}
 .ts164p85{position:absolute;left:106px;top:859px;}
 .ts164p86{position:absolute;left:106px;top:878px;}
 .ts164p88{position:absolute;left:106px;top:896px;}

 /* Font Styles */
 .ft0p164{font-style:normal;font-weight:bold;font-size:13px;font-family:arial,sans-serif;color:#000000;}
 .ft1p164{font-weight:normal;}
 .ft2p164{font-style:normal;font-weight:normal;font-size:13px;font-family:"times new roman","times new roman",times,serif;color:#000000;}
 .ft3p164{font-style:normal;font-weight:normal;font-size:16px;font-family:"times new roman","times new roman",times,serif;color:#000000;}
 .ft4p164{font-style:normal;font-weight:bold;font-size:11px;font-family:arial,sans-serif;color:#000000;}
 .ft5p164{font-style:normal;font-weight:normal;font-size:16px;font-family:"courier new",courier,monospace;color:#000000;}
 .ft6p164{font-family:arial,sans-serif;}
 .ft7p164{font-style:normal;font-weight:normal;font-size:16px;font-family:arial,sans-serif;color:#000000;}

 /* Background Style */
 .styleBackground164{position:absolute;left:97px;top:145px}

 /* Navigation Styles */
 .styleNavBarTop{position:absolute;left:0px;top:2px}
 .nb{position:absolute;left:2px;top:0px}
 .nbs{position:absolute;left:0px;top:0px}
 .nbe{position:absolute;left:836px;top:0px}
 .styleNavBarBot{position:absolute;left:0px;top:1117px}
-->
</STYLE>
<!--End of page styles-->

</head>
<body bgcolor="#ffffff" text="#000000" link="#0000FF" Vlink="#660099">

<table id="pageTable" width="836" STYLE="position: relative; left: auto; top: auto;"><tr><td>
<div class=nbs><img src="./navbarstart.gif" width="2" height="30"></div>
<div class=nb><img src="./navbar.gif" width="836" height="30" alt="Navigation bar"></div>
<div class=nbe><img src="./navbarend.gif" width="2" height="30"></div>
<div class=styleNavBarTop>
<table width="834" height="26" border="0" cellspacing="0">
  <tr align="left">
    <td width="4">&nbsp;</td>
    <td width="25" align="center"><a href="http://www.gravitybox.com" target="_parent"><img src="./home.gif" border="0" alt="Home"></a></td>
    <td width="25" align="center"><a href="#" onClick="window.open('./print.html','Printing','width=300,height=100,toolbar=no,directories=no');return false;"><img src="./print.gif" border="0" alt="Print document"></a></td>
    <td width="10" align="center"><img src="./separator.gif" border="0"></td>
    <td width="18" align="center"><a href="./index1.html"><img src="./start.gif" width="18" height="14" border="0" alt="Start"></a></td>
    <td width="18" align="center"><a href="./index163.html"><img src="./back.gif" width="14" height="14" border="0" alt="Previous page"></a></td>
    <td width="80" valign="middle"><table width="100%" height="16" border="0" cellspacing="1" bgcolor="#ACA899"><tr><td align="center" bgcolor="#ffffff"><font face=verdana,arial,sans-serif><font size="1">&nbsp;164 of 234&nbsp;</font></font></td></tr></table></td>
    <td width="18" align="center"><a href="./index165.html"><img src="./forward.gif" width="14" height="14" border="0" alt="Next page"></a></td>
    <td width="18" align="center"><a href="./index234.html"><img src="./end.gif" width="18" height="14" border="0" alt="End"></a></td>
    <td width="620">&nbsp;</td>
  </tr>
</table>
<p>
</div>
<nobr>
<div class=styleBackground164><img src="./background164.png" width="633" height="910" border="0" alt=""></div>
<div class=ts164p0><span class="ft0p164"> </span></div>
<div class=ts164p1><span class="ft0p164">Gravitybox Schedule Primer<span class="ft1p164"> </span></span></div>
<div class=ts164p3><span class="ft0p164">Page 162&nbsp; </span></div>
<div class=ts164p7><span class="ft2p164"> </span></div>
<div class=ts164p8><span class="ft3p164"> </span></div>
<div class=ts164p9><span class="ft4p164">1998&#45;2004 Gravitybox Software LLC<span class="ft3p164"> </span></span></div>
<div class=ts164p13><span class="ft5p164">Dim F As frmAppointmentDue </span></div>
<div class=ts164p15><span class="ft5p164"> </span></div>
<div class=ts164p16><span class="ft5p164">&nbsp; Set F = New frmAppointmentDue </span></div>
<div class=ts164p18><span class="ft5p164">&nbsp; Set F.ScreenAppt = oScheduleItem </span></div>
<div class=ts164p20><span class="ft5p164">&nbsp; Set F.Appointment = Appointments.GetObject( _ </span></div>
<div class=ts164p23><span class="ft5p164">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; oScheduleItem.UniqueKey, osTag) </span></div>
<div class=ts164p25><span class="ft5p164">&nbsp; Call F.Show </span></div>
<div class=ts164p27><span class="ft5p164">&nbsp; Set F = Nothing </span></div>
<div class=ts164p29><span class="ft5p164">&nbsp;&nbsp; </span></div>
<div class=ts164p31><span class="ft5p164">End Sub<span class="ft6p164"> </span></span></div>
<div class=ts164p33><span class="ft7p164"> </span></div>
<div class=ts164p34><span class="ft7p164">You may be wondering what happens if you remove an appointment that has its </span></div>
<div class=ts164p35><span class="ft7p164">property box displayed. Since they are non&#45;modal this is a very real situation. In the </span></div>
<div class=ts164p39><span class="ft7p164">schedule&#146;s AfterDelete event, a search is performed to determine if an appointment </span></div>
<div class=ts164p40><span class="ft7p164">property box exists for the removed appointment. Since every appointment has a </span></div>
<div class=ts164p41><span class="ft7p164">unique identifier, a routine may be constructed that loops and searches for the </span></div>
<div class=ts164p43><span class="ft7p164">UniqueKey property. If found, the window is unloaded. </span></div>
<div class=ts164p45><span class="ft7p164"> </span></div>
<div class=ts164p46><span class="ft5p164">Private Sub UnloadAppointmentDialog(ByVal sUniqueKey As String) </span></div>
<div class=ts164p48><span class="ft5p164"> </span></div>
<div class=ts164p49><span class="ft5p164">Dim oForm As Form </span></div>
<div class=ts164p51><span class="ft5p164"> </span></div>
<div class=ts164p52><span class="ft5p164">&nbsp; For Each oForm In Forms </span></div>
<div class=ts164p54><span class="ft5p164">&nbsp;&nbsp;&nbsp; If StrComp(oForm.Name, &#34;frmApptProperties&#34;, vbTextCompare) </span></div>
<div class=ts164p56><span class="ft5p164">= 0 Then </span></div>
<div class=ts164p58><span class="ft5p164">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If StrComp(oForm.ScreenAppt.UniqueKey, sUniqueKey, _ </span></div>
<div class=ts164p60><span class="ft5p164">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vbTextCompare) = 0 Then </span></div>
<div class=ts164p62><span class="ft5p164">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Unload oForm </span></div>
<div class=ts164p64><span class="ft5p164">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If </span></div>
<div class=ts164p66><span class="ft5p164">&nbsp;&nbsp;&nbsp; End If </span></div>
<div class=ts164p68><span class="ft5p164">&nbsp; Next </span></div>
<div class=ts164p70><span class="ft5p164"> </span></div>
<div class=ts164p71><span class="ft5p164">End Sub<span class="ft6p164"> </span></span></div>
<div class=ts164p73><span class="ft7p164"> </span></div>
<div class=ts164p74><span class="ft7p164">This concludes the example. Of course the creation of a full&#45;fledged program is more </span></div>
<div class=ts164p78><span class="ft7p164">complicated than what I have described. I do not find it necessary to fill volumes with </span></div>
<div class=ts164p79><span class="ft7p164">source code that you are neither going to read. All of the code is available on&#45;line and in </span></div>
<div class=ts164p82><span class="ft7p164">digital format so that you may actually compile and use it. There are many supporting </span></div>
<div class=ts164p84><span class="ft7p164">routines and an API that are used in the GbOrganize example. In its current incarnation </span></div>
<div class=ts164p85><span class="ft7p164">there are about 8500 lines of code. This is not much considering that all of the </span></div>
<div class=ts164p86><span class="ft7p164">functionality that it provides. Since the entire source is provided for the example, you </span></div>
<div class=ts164p88><span class="ft7p164">may feel free to extend it and add any useful functionality that you may dream&#45;up.</span></div>
<div class=styleNavBarBot>
<table width="836" border="0" cellspacing="2">
  <tr></tr>
  <tr>
    <td width="118"><a href="http://www.purepage.com"><img src="./smalllogo.gif" width="118" height="46" border="0" alt="http://www.purepage.com"></a></td>
    <td></td>
  </tr>
</table>
</div>

</td></tr></table>

</body>
</html>
